package org.codeart.iterator.example01;

import java.util.ArrayList;
import java.util.List;

public class Client {

    public static void main(String[] args) {
        List<String> list = new ArrayList<String>() {{
            add("洛必达");
            add("欧拉");
            add("高斯");
            add("伯努利");
        }};
        
        Iterator<String> it = new ConcreteIterator<>(list);
        while (it.hasNext()) {
            String s = it.next();
            System.out.println(s);
        }
    }

}
